left1()
setInterval(left1, 1000 * 3)
setInterval(left2, 1000 * 3)
function left1() {
    $.ajax({
        url: "/api/left1",
        success: function(data) {
            //  console.log(optionl2.xAxis[0].data);
            // console.log(data);

            optionl1.xAxis[0].data = data.x;
            optionl1.series[0].data = data.y;
            myChartl1.setOption(optionl1);

        },
        error: function(xhr, type, errorThrown) {

        }
    })
}
function left2() {
    $.ajax({
        url: "/api/left2",
        success: function(data) {
            // console.log(optionl2.xAxis[0].data)
            // console.log(data)

            optionl2.xAxis[0].data = data.x;
            optionl2.series[0].data = data.y;
            myChartl2.setOption(optionl2);

        },
        error: function(xhr, type, errorThrown) {

        }
    })
}
